package be.xios.ti.droodle;

import java.awt.*;
import java.util.*;

/**
 * Een tekening bestaat uit Shape objecten die in een Vector
 * worden bewaard.
 * 
 * @author kris
 */
public final class Drawing {
	private ArrayList<Shape> shapes;
	private String description;
	private Color background;
	
	public Drawing() {
		shapes = new ArrayList<Shape>();
		description = "";
	}
	
	
	/**
	 * @param description The description to set.
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	/**
	 * @return Returns the description.
	 */
	public String getDescription() {
		return description;
	}


	/**
	 * Voeg de shape toe aan dit Drawing object
	 * @param shape de volgende shape
	 */
	public void add(Shape shape) {
		shapes.add(shape);
	}


	/**
	 * @param g
	 */
	public void draw(Graphics g) {
		for (Shape s : shapes) {
         s.draw(g);
      }
	}
	/**
	 * @return Returns the background.
	 */
	public Color getBackground() {
		return background;
	}
	/**
	 * @param background The background to set.
	 */
	public void setBackground(Color background) {
		this.background = background;
	}
	/**
	 * @return Returns the shapes.
	 */
	public ArrayList getShapes() {
		return shapes;
	}
}
